package com.block.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

public class SmallUtils {

    /**
     * 生成随机id
     * @return
     */
    public  String uuid(){
        String uuid= UUID.randomUUID().toString();
        return uuid;
    }

    /**
     * 获取当前年月日
     * @return
     */
    public Date getNowDate(){

        SimpleDateFormat bartDateFormat =new SimpleDateFormat("yyyy-MM-dd");
        Date dat3 = new Date();
        try {
            Date date = bartDateFormat.parse(bartDateFormat.format(dat3));//转换成年月日形式，时间
            System.out.println(date);
            return date;
        }catch (Exception e){
            System.out.println("日...期...错...误....................");
        }
        return null;




    }


}
